<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        *{
            margin:0px;
            padding:0px;
            list-style:nome;
        }
        textarea{
            width:800px;
            margin:10px auto;
            display: block;
            resize:nome;
            outline:nome;
        }
        button{
            width:800px;
            margin:10px auto;
            display:block;
            background:orange;
            border:nome;
            outline:nome;
            line-height: 40px;
            cursor:pointer;
            color:#fff;
        }
        ul{
            width:800px;
            margin:10px auto;
        }
        ul>li{
            background-color:olivedrab;
            margin-bottom: 10px;
            position: relative;
            padding:4px;
            cursor: pointer;
        }
    </style>
</head>
<body>
    <textarea name="" id="txt" cols="30" rows="10"></textarea>
   <button id="btn">微博发布</button>
    <ul id="box">
        <li>
            昨晚风雨交加
            <p>2021-06-04</p>
            <span>x</span>
        </li>
    </ul>

    <script>
        btn.onclick=function(){
            var val=txt.value;
            var tag=document.createElement('li');
            tag.innerHtML= `${val}
            <p>2021-06-04</p>
            <span>X<span>`
            box.appendChild(tag)
        }

    </script>
</body>
</html>